package com.yourcompany.api.vo;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.yourcompany.common.utils.CustomLongSerializer;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.List;

@Data
@Schema(description = "地区视图对象")
public class RegionVO {
    
    @JsonSerialize(using = CustomLongSerializer.class)
    @Schema(description = "地区ID")
    private Long id;
    
    @JsonSerialize(using = CustomLongSerializer.class)
    @Schema(description = "父级ID")
    private Long parentId;
    
    @Schema(description = "地区名称")
    private String name;
    
    @Schema(description = "地区编码")
    private String code;
    
    @Schema(description = "级别：1-省 2-市 3-区县 4-街道")
    private Integer level;
    
    @Schema(description = "排序")
    private Integer sort;
    
    @Schema(description = "状态：0-禁用 1-启用")
    private Boolean status;
    
    @Schema(description = "创建时间")
    private LocalDateTime createTime;
    
    @Schema(description = "子地区列表")
    private List<RegionVO> children;
} 